<template>
	<view>
		<h3 class="gedan">歌单</h3>
		<div class="lists" v-for="item in playlist" :key="item.id" @click="jump(item.id)">
			<div class="left">
				<!--  #ifdef  MP-WEIXIN -->
				<image :src="item.coverImgUrl"></image>
				<!--  #endif -->
				<!--  #ifndef  MP-WEIXIN -->
				<img  v-lazy="item.coverImgUrl"> 
				<!--  #endif -->
			</div>
			<h4>{{item.name}}</h4>
		</div>
	</view>
</template>

<script>
	export default {
		props:['playlist'],
		data() {
			return {
				
			}
		},
		methods:{
			jump(id){
				this.$emit('jump',id)
			}
		}
	}
</script>

<style lang="scss">
	.gedan{
		padding-left: 10px;
		background-color: #eeeff0;
		font-size: 12px;
		color: #666;
		margin-bottom: 0px;
		height: 28px;
		display: flex;
		align-items: center;
	}
	.lists{
		width: 100%;
		height: 56px;
		padding-left: 6px;
		display: flex;
		margin-bottom: 20rpx;
		.left{
			height: 100%;
			width: 56px;
			margin-right: 10px;
			/*  #ifdef  MP-WEIXIN  */
			image{
				width: 100%;
				height: 100%;
			}
			/*  #endif  */
			/*  #ifndef  MP-WEIXIN  */
			img{
				width: 100%;
				height: 100%;
			}
			/*  #endif  */
		}
		h4{
			margin-top: 6px;
			height: 20px;
			font-size: 17px;
			color: #333;
			font-weight: 400;
		}
	}
</style>
